package SinglePattern.LazyModel;

/**
 * 饿汉模式
 * @author
 * @create 2018-10-18 11:21
 **/
public class LazyModelTest {


    public static void main(String[] args) {
        LazyModel instance = LazyModel.getInstance();
        LazyModel instance2 = LazyModel.getInstance();
        if (instance == instance2) {
            System.out.println("我们是相同的对象");
        }
        instance.lazyModelHello();

    }
}
